<?php

namespace App\Services;


use Illuminate\Support\Facades\DB;

trait  Service
{
    private static $instance;

    public static function instance()
    {

        if (!isset(self::$instance)) {
            self::$instance = new static();//这里不能new self(),self和static区别
        }
        return self::$instance;
    }

}
